#版本
cmake_minimum_required(VERSION 3.10)
#linux-uart源文件提取出来放在 SRC_CPP_LISTS 中
aux_source_directory(linux-uart SRC_CPP_LISTS)
#fingerprint源文件提取出来放在 SRC_CPP_LISTS 中
aux_source_directory(fingerprint SRC_CPP_LISTS)
#asound源文件提取出来放在 SRC_CPP_LISTS 中
aux_source_directory(asound SRC_CPP_LISTS)

aux_source_directory(ai-speech-recognition SRC_CPP_LISTS)
aux_source_directory(jsoncpp SRC_CPP_LISTS)
aux_source_directory(smart-device SRC_CPP_LISTS)
aux_source_directory(smart-device-net SRC_CPP_LISTS)
aux_source_directory(smart-device-gateway SRC_CPP_LISTS)
aux_source_directory(smart-device-database SRC_CPP_LISTS)


#生成一个静态库
add_library(smart_dev STATIC ${SRC_CPP_LISTS})

target_include_directories(smart_dev PUBLIC ${CMAKE_SOURCE_DIR}/src/linux-uart)
target_include_directories(smart_dev PUBLIC ${CMAKE_SOURCE_DIR}/include)
target_include_directories(smart_dev PUBLIC ${CMAKE_SOURCE_DIR}/src/asound)
target_include_directories(smart_dev PUBLIC ${CMAKE_SOURCE_DIR}/src/smart-device)
target_include_directories(smart_dev PUBLIC ${CMAKE_SOURCE_DIR}/src/smart-device-net)
target_include_directories(smart_dev PUBLIC ${CMAKE_SOURCE_DIR}/src/smart-device-database)
target_include_directories(smart_dev PUBLIC ${CMAKE_SOURCE_DIR}/src/smart-device-gateway)
target_include_directories(smart_dev PUBLIC ${CMAKE_SOURCE_DIR}/src/fingerprint)

target_link_libraries(smart_dev ${CMAKE_SOURCE_DIR}/lib/x64/libsnowboy-detect.a cblas)
target_link_libraries(smart_dev curl sqlite3 mosquitto)